<template>
  <!-- 合同主要信息 -->
  <div id="contractMainInfo">
    <el-form :model="data" label-width="100">
      <el-form-item label="编号:">
        <p>{{ data.num }}</p>
      </el-form-item>
      <el-form-item label="申请人:">
        <p>{{ data.applicantName }}</p>
      </el-form-item>
      <el-form-item label="流程:">
        <p>{{ data.dictsortName }}</p>
      </el-form-item>
      <el-form-item label="部门:">
        <p>{{ data.departmentName }}</p>
      </el-form-item>
      <el-form-item label="类型:">
        <p>{{ data.dictsortName }}</p>
      </el-form-item>
      <el-form-item label="当前审核人:">
        <p>{{ data.auditName }}</p>
      </el-form-item>
      <el-form-item label="审批状态:" v-if="isReloadData">
        <!-- 0，待审核，1审核通过，2审核不通过 -->
        <p v-if="data.totalStatus == 0" style="color: #e6a23c">待审核</p>
        <p v-if="data.totalStatus == 1" style="color: #67c23a">通过</p>
        <p v-if="data.totalStatus == 2" style="color: #f56c6c">未通过</p>
        <p v-if="data.totalStatus == 3" style="color: #ff9b31">审核中</p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  name: 'contractMainInfo',
  data () {
    return {
      form: {},
      isReloadData: true//局部刷新标识
    }
  },
  props: {
    data: {
      type: Object,
      required: true,
      default: () => { return {} }
    }
  },
  methods: {
    relodPart () {
      this.isReloadData = false
      this.$nextTick(() => {
        this.isReloadData = true
      })
    }
  }
}
</script>